# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Vincent Cappe <vcappe at gmail dot com>
# Contributor: Jeff Bailes <thepizzaking at gmail dot com>
# Contributor: SpepS <dreamspepser at yahoo dot it>

pkgname=liboggz
pkgver=1.1.1
pkgrel=7
pkgdesc="A simple programming interface for reading and writing Ogg files and streams"
arch=('loong64' 'x86_64')
url="https://www.xiph.org/oggz/"
license=('BSD')
depends=('bash' 'libogg')
makedepends=('doxygen')
provides=('liboggz.so')
source=("https://downloads.xiph.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('8f5fc8ca49cb6f7a1160a9c1932876b771d55985d59ddc1f48497dfc08641414a58244d7a7e52bfcecdb69f52913d0123efd8f92513f8b9064e4abe1442f2cba')

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr \
              --enable-static=no
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  # license
  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  # bash completion
  install -vDm 644 bash-completion/oggz \
    -t "${pkgdir}/usr/share/bash-completion/completions/"
  # docs
  install -vDm 644 {AUTHORS,ChangeLog,NEWS,README,TODO} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}
